<script setup lang="ts">
const user = {
  userPhone: "1509014967",
  userEmail: "2015318852@qq.com",
  userNickname: "愤怒的蛋炒饭",
  userName: "xak",
  userSex: "1",
  userBirthday: "2020-03-07",
};
</script>

<template>
  <div class="profile-card">
    <h2>个人信息</h2>
    <div class="info-item">
      <span class="label">📱 手机</span>
      <p>{{ user.userPhone }}</p>
    </div>
    <div class="info-item">
      <span class="label">📧 邮箱</span>
      <p>{{ user.userEmail }}</p>
    </div>
    <div class="info-item">
      <span class="label">🎭 昵称</span>
      <p>{{ user.userNickname }}</p>
    </div>
    <div class="info-item">
      <span class="label">🧑 姓名</span>
      <p>{{ user.userName }}</p>
    </div>
    <div class="info-item">
      <span class="label">⚧ 性别</span>
      <p>{{ user.userSex === "1" ? "男" : "女" }}</p>
    </div>
    <div class="info-item">
      <span class="label">🎂 生日</span>
      <p>{{ user.userBirthday }}</p>
    </div>
    <button class="edit-btn">编辑</button>
  </div>
</template>

<style scoped>
.profile-card {
  max-width: 400px;
  margin: 40px auto;
  padding: 20px 24px;
  border-radius: 16px;
  background: #fff;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
  font-family: "Microsoft YaHei", sans-serif;
}

h2 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #333;
  text-align: center;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.label {
  font-weight: 600;
  color: #555;
}

p {
  margin: 0;
  color: #666;
}

.edit-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  background: #409eff;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.edit-btn:hover {
  background: #66b1ff;
}
</style>
